Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify client behavior for 502 and 504 response codes #623

Merged
merged 2 commits into from
Feb 19, 2025

Conversation

tigrannajaryan
Copy link
Member

@tigrannajaryan tigrannajaryan commented Feb 12, 2025

The spec previously said that the client should retry if 502 or 504 response is received. However, it was not specified what retry strategy should be used if Retry-After header is missing.

The spec now says that the behavior when Retry-After is missing is the same for all 4 expected codes: 429,502,503,504.

This is not a breaking change. I consider it a bug in the spec. 949095b introduced codes 502 and 504 but forgot to describe their behavior in the throttling section. The change fixes the bug.

The other perspective is that this defines a previously unspecified behavior and does it in a SHOULD clause, so any existing client implementations that do not match the newly specified behavior are still legal (because it is a SHOULD clase and not a MUST clause). This is also an acceptable change to the spec (not breaking).

@tigrannajaryan tigrannajaryan requested a review from a team as a code owner February 12, 2025 17:18
@tigrannajaryan tigrannajaryan force-pushed the tigran/clarify-502504 branch 2 times, most recently from 5afd972 to dc4a80e Compare February 12, 2025 21:26
@tigrannajaryan tigrannajaryan force-pushed the tigran/clarify-502504 branch 2 times, most recently from ef1b555 to 0bef743 Compare February 18, 2025 19:01
The spec previously said that the client should retry if 502 or 504
response is received. However, it was not specified what retry strategy
should be used if Retry-After header is missing.

The spec now says that the behavior when Retry-After is missing
is the same for all 4 expected codes: 429,502,503,504.
@arminru arminru merged commit b41217b into open-telemetry:main Feb 19, 2025
15 checks passed
@tigrannajaryan tigrannajaryan deleted the tigran/clarify-502504 branch February 19, 2025 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants